home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / parser.jar / com / sun / xml / parser / ValidatingParser$ChildrenValidator.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-02-23  |  1.6 KB  |  41 lines

  1. package com.sun.xml.parser;
  2.  
  3. import org.xml.sax.SAXException;
  4.  
  5. class ValidatingParser$ChildrenValidator extends ElementValidator {
  6.    // $FF: synthetic field
  7.    private final ValidatingParser this$0;
  8.    private ContentModelState state;
  9.    private String name;
  10.  
  11.    ValidatingParser$ChildrenValidator(ValidatingParser var1, ElementDecl var2) {
  12.       this.this$0 = var1;
  13.       this.state = new ContentModelState(var2.model);
  14.       this.name = var2.name;
  15.    }
  16.  
  17.    public void consume(String var1) throws SAXException {
  18.       if (this.state == null) {
  19.          this.this$0.error("V-035", new Object[]{this.name, var1});
  20.       } else {
  21.          try {
  22.             this.state = this.state.advance(var1);
  23.          } catch (EndOfInputException var2) {
  24.             this.this$0.error("V-036", new Object[]{this.name, var1});
  25.          }
  26.       }
  27.  
  28.    }
  29.  
  30.    public void done() throws SAXException {
  31.       if (this.state != null && !this.state.terminate()) {
  32.          this.this$0.error("V-038", new Object[]{this.name});
  33.       }
  34.  
  35.    }
  36.  
  37.    public void text() throws SAXException {
  38.       this.this$0.error("V-037", new Object[]{this.name});
  39.    }
  40. }
  41.